package aop.javaProxy;

import aop.javaProxy.dao.UserTwoDao;

public class UserTwoDaoProxy implements UserTwoDao {
	private UserTwoDao userTwoDao;

	public UserTwoDaoProxy(UserTwoDao userTwoDao) {
		this.userTwoDao = userTwoDao;
	}

	@Override
	public boolean add() {
//		long startTime = System.currentTimeMillis();
		boolean a = userTwoDao.add();
//		long endTime = System.currentTimeMillis();
//		System.out.println("执行时间" + (endTime - startTime));
		System.out.println("add 返回值" + a);
		return a;

	}

	@Override
	public boolean delete() {
//		long startTime = System.currentTimeMillis();
		boolean b = userTwoDao.delete();
//		long endTime = System.currentTimeMillis();
		System.out.println("add 返回值" + b);
		return b;

	}

	@Override
	public boolean update() {
//		long startTime = System.currentTimeMillis();
		boolean c = userTwoDao.delete();
//		long endTime = System.currentTimeMillis();
//		System.out.println("执行时间" + (endTime - startTime));
		return c;
		// TODO Auto-generated method stub

	}

	@Override
	public boolean list() {
//		long startTime = System.currentTimeMillis();
		boolean d = userTwoDao.delete();
//		long endTime = System.currentTimeMillis();
//		System.out.println("执行时间" + (endTime - startTime));
		return d;
		// TODO Auto-generated method stub

	}

}
